<script>
	export default {
		onLaunch: function() {
			console.log('APP onLaunch')
			window.addEventListener('unload',this.saveState)
			var loginRes = this.checkLogin();
			if (!loginRes) {
				return false;
			}			
		},
		onShow: function() {

		},
		onHide: function() {

		},
		methods: {
			saveState(){
				window.sessionStorage.setItem('state', JSON.stringify(this.$store.state))
			}
		}
	}
</script>

<style lang="scss">
	@import "@/uni_modules/uview-ui/index.scss";
	@import url("~@/static/font/iconfont.css");
	/*每个页面公共css */
</style>
